/*Copyright (C) 2009 - 2011 MASSART GAUTHIER

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef CONSTANTES_HEADER
# define CONSTANTES_HEADER

# define DEFAULT_SCREEN_SIZE_X 130
# define MAX_PLAYER_NAME_LENGHT 30

# define COL_ERREUR COLOR_RED

# define KEY_SPACE	'\x20'
# define KEY_ESCAPE	'\x1B'
# define M_KEY_BACKTAB 351

# define MIN(a, b) (a < b ? a : b)
# define sizearray(a)  (sizeof(a) / sizeof((a)[0]))

# ifdef WIN32
#  define KEY_RETURN	'\r'
#  define M_KEY_BACKSPACE	'\b'
#  define M_KEY_DELETE	'\x80'
# else /*ifndef WIN32*/
#  define KEY_RETURN	'\n'
#  define M_KEY_BACKSPACE	KEY_BACKSPACE
#  define M_KEY_DELETE	KEY_DC
# endif /*ifdef WIN32*/
# include "log.h"

typedef struct {
	int x;
	int y;
} Position;

typedef void (*list_menu)(void);

extern const char version_jeu[];
extern short CT, CS, CTS, CBS;
extern short volume_musique, volume_son;
extern short touche_haut, touche_bas, touche_droite, touche_gauche;
extern short type_menu;
extern char prenom[100];
extern bool animation_menu, animations_bienvenue_fin, verif_maj_start;
extern const GameName LOG_BANTUMI;
extern const GameName LOG_CHIFUMI;
extern const GameName LOG_DAMES;
extern const GameName LOG_SDL_mixer;
extern const GameName LOG_MORPION;
extern const GameName LOG_PENDU;
extern const GameName LOG_PLUSOUMOINS;
extern const GameName LOG_POUSSECAISSE;
extern const GameName LOG_SNAKE;
extern const GameName LOG_TETRIS;
extern const GameName LOG_TOURSDEHANOI;
extern const GameName LOG_DEFAULT;

#endif /*ifndef CONSTANTES_HEADER*/
